using System;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.Practices.EnterpriseLibrary.Common;
using Microsoft.Practices.EnterpriseLibrary.Data;

public partial class Templates_ArticleTemplates_Default_ShowArticle : System.Web.UI.UserControl
{
    private string articleId = "";
    private Database db;

    public virtual string ArticleId
    {
        get { return this.articleId; }
        set { this.articleId = value; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        db = DatabaseFactory.CreateDatabase(ConfigurationManager.AppSettings["ConnectionStringName"]);
        DbCommand comArt = db.GetStoredProcCommand("Article ById");
        comArt.Parameters.Add(new SqlParameter("@ArticleId", this.articleId));
        repArticle.DataSource = db.ExecuteDataSet(comArt);
        repArticle.DataBind();

    }
}
